
/***************************************************************************************
****************************************************************************************
* FILE		: ram.h
* Description	: 
*			  
* Copyright (c) 2020 by Simlife. All Rights Reserved.
* 
* History:
* Version		Name		Date				Description
   0.1		Alen			2020/05/07		Initial Version
   
****************************************************************************************
****************************************************************************************/

#ifndef _RAM_H_
#define _RAM_H_

#ifdef GLOBAL_EXT_
#define GL_TYPE
#else
#define GL_TYPE extern
#endif

GL_TYPE structTime stTime;
// DEFINE_SFR(structTime, stTime, 0x180);
#define flag200us stTime.flag.bits.b0
#define flag10ms stTime.flag.bits.b1
#define flag250ms stTime.flag.bits.b2
#define flag500ms stTime.flag.bits.b3

GL_TYPE structSystem stSystem;
// DEFINE_SFR(structSystem, stSystem, 0x193);
#define flagSystemStatus stSystem.flag.bits.b0
#define flagSystemLowPower stSystem.flag.bits.b1
#define flagSystemCharge stSystem.flag.bits.b2
#define flagSystemChargeFull stSystem.flag.bits.b3
#define flagModeChange stSystem.flag.bits.b4
#define flagAllMode stSystem.flag.bits.b5
#define flagHeat stSystem.flag.bits.b6

#define flagG1 stSystem.greenFlag.bits.b0
#define flagG2 stSystem.greenFlag.bits.b1
#define flagG3 stSystem.greenFlag.bits.b2
#define flagG4 stSystem.greenFlag.bits.b3
#define flagG5 stSystem.greenFlag.bits.b4
#define flagGL stSystem.greenFlag.bits.b5
#define flagGR stSystem.greenFlag.bits.b6

GL_TYPE structVibration stVibration;
// DEFINE_SFR(structVibration, stVibration, 0x1a0);

// GL_TYPE SEND_FIFO stSentFifo;
DEFINE_SFR(SEND_FIFO, stSentFifo, 0x180);
// GL_TYPE REC_FIFO stReceiveFifo;
DEFINE_SFR(REC_FIFO, stReceiveFifo, 0x1B0);

GL_TYPE BT_MESS stBtInfo;

#endif /*_RAM_H_*/
